home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 5⁄18⁄90 / 1300-Re UnloadAllSegs-May90 < prev    next >
Encoding:
Text File  |  1990-05-18  |  1.7 KB  |  44 lines  |  [TEXT/GEOL]

  1. Item forwarded  by  PHAC         to DOUGLASS1    MEIER1
  2.  
  3. Item    9622631                         15-May-90        15:52PDT
  4.  
  5. From:   ROSENSTEIN1                     Rosenstein, Larry
  6.  
  7. To:     CDA0004                         VAR Shana Corp, Don Murphy,IVR
  8.         MACAPP.TECH$                    MacApp Technical
  9.  
  10. Sub:    RE>UnloadAllSegs
  11.  
  12. Attn: Wayne Malkin
  13. Attn:   MacApp Tech
  14. SentBy: Larry Rosenstein
  15.         Reply to:   RE>UnloadAllSegs
  16. Wayne,
  17.  
  18. I don't think the failure handling code is suppose to work if you return from
  19. the routine that calls CatchFailures, for the reason you gave.  We did a
  20. special case hack for the MacApp startup code where the handler is set up in
  21. one place and removed when initialization is complete.  Other than that, you
  22. must call Success in the same routine that you call CatchFailures.
  23.  
  24. You can use global routines for the failure handler, and call CatchFailures in
  25. a global routine.
  26.  
  27. It seems that your technique might result in heap fragmentation, although it
  28. will reduce the maximum amount of loaded code.  Perhaps the heap fragmentation
  29. isn't a problem compared to the benefit of the reduced code reserve.  You can
  30. also eliminate that by explicitly preloading segments that you know won't be
  31. unloaded.
  32.  
  33. Also, if someone didn't want to modify the MacApp segment-handling code,
  34. MacApp does provide all the tools necessary to manage the application's code
  35. segments.  If you know the situation(s) in which the maximum loaded code is
  36. excessive, you can temporarily mark segments as resident and call
  37. UnloadAllSegments in the middle of an operation (rather than waiting until you
  38. return to the event loop).  Your approach has the advantage of being
  39. automatic.
  40.  
  41. Larry
  42.  
  43.  
  44.